#ifndef MESSAGE_H
#define MESSAGE_H

#include <QObject>
#include <QDateTime>

class Message : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString author READ author WRITE setAuthor NOTIFY authorChanged)
    Q_PROPERTY(QDateTime creationDate READ creationDate WRITE setCreationDate NOTIFY creationDateChanged)

public:
    explicit Message(QObject *parent = nullptr);

    const QString& author();
    void setAuthor(const QString& author);
    const QDateTime& creationDate();
    void setCreationDate(const QDateTime& creationDate);

signals:
    void authorChanged();
    void creationDateChanged();

private:
    QString m_author = "";
    QDateTime m_creationDate;
};

#endif // MESSAGE_H
